Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RHCLOUD-30651] Independently log cloud-connector dispatchers map #315

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jessicarod7
Copy link
Member

What?

https://issues.redhat.com/browse/RHCLOUD-30651

Why?

Dispatcher entries can be pulled directly from debug log messages for alternative parsing and application.

How?

The dispatcher map is marshalled to JSON and printed.

Testing

Tested with TestProcessDispatchers(). Example output:

=== RUN   TestProcessDispatchers
time="2024-10-31T12:26:30-04:00" level=debug msg="Dispatchers found: {\"catalog\":{\"ApplicationType\":\"ima_app_type\",\"SourceRef\":\"ima_source_ref\",\"SrcName\":\"ima_source_name\",\"SrcType\":\"ima_source_type\"}}" func=github.com/RedHatInsights/cloud-connector/internal/cloud_connector.processDispatchers file="/home/jrodri/develop/cloud-connector/internal/cloud_connector/message_handlers.go:224" account=12345 client_id=98765 org_id=54321
--- PASS: TestProcessDispatchers (0.00s)
PASS

Secure Coding Practices Checklist Link

Secure Coding Checklist

  • Input Validation
  • Output Encoding
  • Authentication and Password Management
  • Session Management
  • Access Control
  • Cryptographic Practices
  • Error Handling and Logging
  • Data Protection
  • Communication Security
  • System Configuration
  • Database Security
  • File Management
  • Memory Management
  • General Coding Practices

Copy link
Contributor

@dehort dehort left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good. I left a comment.

internal/cloud_connector/message_handlers.go Show resolved Hide resolved
@jessicarod7
Copy link
Member Author

/retest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants